<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title></title>
  </head>
  <body>
    <div id="app">
      <div>
        <!-- 当按下 Ctrl 时，即使同时按下 Alt 或 Shift 也会触发 -->
        <button @click.ctrl="onClick">A</button>
      </div>
      <div>
        <!-- 仅当按下 Ctrl 且未按任何其他键时才会触发 -->
        <button @click.ctrl.exact="onClick">A</button>
      </div>
      <div>
        <!-- 仅当没有按下任何系统按键时触发 -->
        <button @click.exact="onClick">A</button>
      </div>
    </div>

    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>

    <script>
      const { createApp, ref } = Vue;

      const app = createApp({
        setup() {
          function onClick(...args) {
            console.log(args);
          }

          return {
            onClick,
          };
        },
      });

      app.mount("#app");
    </script>
  </body>
</html>
